package org.jeese.web;

import javax.validation.Valid;

import org.jeese.demo.Demo;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class DemoController {

	@ResponseBody
	@PostMapping("demo/valid.html")
	public String valid(@Valid Demo demo) {
		StringBuffer stringBuffer = new StringBuffer();
		return stringBuffer != null ? stringBuffer.toString() : "";
	}
	
	@GetMapping("404.html")
	public String notfund() {
		return "";
	}
}
